package com.leyou.auth.thread;

import com.leyou.auth.dto.UserDetails;

/**
 * @author 虎哥
 */
public abstract class GoodsContext {
    private static final ThreadLocal<UserDetails> tl2 = new ThreadLocal<>();

    public static void setUser(UserDetails user){
        tl2.set(user);
    }

    public static UserDetails getUser(){
        return tl2.get();
    }

    public static void removeUser(){
        tl2.remove();
    }
}
